﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<z.m.File>" %>

<% if (ViewData["type"] == "header") {%>
	<tr>
		<td>File Name</td>
		<td colspan="99">Controll</td>
	</tr>
<%} else if (ViewData["type"] == null) {%>
<tr id="img<%:Model.OldName%>" data-id="<%:Model.OldName%>">
	<td>
		<div class="img">
			<img style="max-width: 100px; max-height: 100px" src="<%:Url.Content("~/Content/img/i/"+Model.OldName+".jpg") %>" />
		</div>
		<input name="OldName" type="text" readonly="readonly" style="visibility:hidden" value="<%:Model.OldName%>" />
	</td>
	<td><%:Html.TextBoxFor(m=>m.Name)%></td>
	<td><textarea><%:Url.Content("~/Content/img/i/"+Model.OldName+".jpg") %></textarea></td>
	<td>
		<input name="file" type="file" accept="image/jpeg" />
	</td>
	<td>
		<input type="button" value="<%:Model.OldName=="0"?"Add":"Save" %>" onclick='ajaxTrSubmit(event);' />
	</td>
	<td>
		<input type="button" value="Delete" onclick='ajaxTrBtn(event,"Delete");' />
	</td>
</tr>
<%}%>